import pathway as pw

from application.etl.kafka_to_info_etl import KafkaToInfo
from application.etl.nsfc_to_kafka_etl import NsfcToKafkaEtl
from application.utils import get_logger

# 创建日志记录器
logger = get_logger(__name__)
if __name__ == '__main__':
    # 注意得现有生产者才能消费
    # python -m application.router
    logger.info("正在启动pathway应用")
    nsfc_to_kafka = KafkaToInfo()
    nsfc_to_kafka.run()
    pw.run(monitoring_level=pw.MonitoringLevel.NONE)
